import { createApp } from 'vue'
import App from './App.vue'
//引入全局图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入pinia
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persistedstate';
//引入pinia的方法
const pinia =createPinia()
// 注册插件
pinia.use(piniaPersist);
//引入组件库
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//引入清除默认样式
import './assets/styles/reset.scss'
//引入路由
import router from './router'
//使用router
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(router).use(ElementPlus).use(pinia).mount('#app')

